package com.cyys.modules.core.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(description= "分页请求参数")
public class PramPage {

    @ApiModelProperty(value="当前页码",required = true)
    private Long current;

    @ApiModelProperty(value="每页显示行数",required = true)
    private Long size;

    public Page toPage(){
        Page page = new Page();
        page.setCurrent(current);
        page.setSize(size);
        return page;
    }

}
